#include "xlcomm/base/string_piece.h"

#include <string.h>

namespace xlcomm {

void StringPiece::SlashBehind() {
  const char* slash = strrchr(data_, '/');
  if (!slash) {
    slash = strrchr(data_, '\\');
  }

  if (slash) {
    data_ = slash + 1;
  }
  length_ = static_cast<int>(strlen(data_));
}

}  // namespace xlcomm